Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add l1 gas estimation for l2 #299

Merged
merged 34 commits into from
Mar 7, 2024
Merged

Conversation

npty
Copy link
Member

@npty npty commented Feb 20, 2024

Description

AXE-3191

This PR included l1 gas estimation when specifying destination L2 chain. The additional param executeData will be required if the destination chain is a L2 chain, otherwise the error will be thrown.

Breaking Changes

The sourceChainTokenSymbol will not be required anymore. If not specified, the native token of source chain will be used to calculate estimated fee. The following functions are affected:

  • calculateNativeGasFee
  • estimateGasFee

Rationale

  • Streamlined User Experience: This change reduces input requirements, providing a more convenient developer experience.

@npty npty requested a review from canhtrinh February 20, 2024 10:32
src/constants/L2Chain.ts Outdated Show resolved Hide resolved
@npty npty requested a review from canhtrinh February 23, 2024 16:09
src/utils/isL2Chain.ts Outdated Show resolved Hide resolved
src/libs/fee/getL1Fee.ts Outdated Show resolved Hide resolved
@canhtrinh
Copy link
Collaborator

hey @npty i had some additional questions and also submitted this PR for some suggested changes we can discuss: #300

@npty
Copy link
Member Author

npty commented Feb 29, 2024

hey @npty i had some additional questions and also submitted this PR for some suggested changes we can discuss: #300

Thanks for the fix! It's already merged

@npty npty requested a review from canhtrinh March 6, 2024 12:55
@canhtrinh canhtrinh merged commit 80f0e0d into main Mar 7, 2024
4 checks passed
@canhtrinh canhtrinh deleted the feat/add-l1-gas-estimation-for-l2 branch March 7, 2024 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants